package com.localjoycommunity.cpdj.project.system.domain;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.localjoycommunity.cpdj.framework.aspectj.lang.annotation.Excel;
import com.localjoycommunity.cpdj.framework.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 新闻资讯对象 sys_news
 *
 * @author leepandar
 * @date 2020-11-02
 */
public class SysNews extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    private Long newsId;

    /**
     * 标题
     */
    @Excel(name = "标题")
    private String title;

    /**
     * 阅读数量
     */
    @Excel(name = "阅读数量")
    private Long reading;

    /**
     * 点赞数量
     */
    @Excel(name = "点赞数量")
    private Long likes;

    /**
     * 排序
     */
    @Excel(name = "排序")
    private Long orders;

    /**
     * 0：下架  1：上架
     */
    @Excel(name = " 0：下架  1：上架")
    private String status;

    /**
     * 1:置顶 0：未置顶
     */
    @Excel(name = "1:置顶 0：未置顶")
    private String isTop;

    /**
     * 主图
     */
    @Excel(name = "主图")
    private String banner;

    /**
     * 内容
     */
    @Excel(name = "内容")
    private String content;

    @TableField(exist = false)
    private int isDig;

    @JsonFormat(pattern = "yyyy-MM-dd")
    private Date createTime;

    /**
     * 资讯类型
     * 1：街道相关政策及重要通知
     * 2：人力社保相关信息
     * 3：税务相关信息
     * 4：其他信息
     */
    private String newsType;

    @Override
    public Date getCreateTime() {
        return createTime;
    }

    @Override
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public int getIsDig() {
        return isDig;
    }

    public void setIsDig(int isDig) {
        this.isDig = isDig;
    }

    public void setNewsId(Long newsId) {
        this.newsId = newsId;
    }

    public Long getNewsId() {
        return newsId;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getTitle() {
        return title;
    }

    public void setReading(Long reading) {
        this.reading = reading;
    }

    public Long getReading() {
        return reading;
    }

    public void setLikes(Long likes) {
        this.likes = likes;
    }

    public Long getLikes() {
        return likes;
    }

    public void setOrders(Long orders) {
        this.orders = orders;
    }

    public Long getOrders() {
        return orders;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getIsTop() {
        return isTop;
    }

    public void setIsTop(String isTop) {
        this.isTop = isTop;
    }

    public void setBanner(String banner) {
        this.banner = banner;
    }

    public String getBanner() {
        return banner;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public String getContent() {
        return content;
    }

    public String getNewsType() {
        return newsType;
    }

    public void setNewsType(String newsType) {
        this.newsType = newsType;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("newsId", getNewsId())
                .append("title", getTitle())
                .append("reading", getReading())
                .append("likes", getLikes())
                .append("orders", getOrders())
                .append("status", getStatus())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("isTop", getIsTop())
                .append("banner", getBanner())
                .append("content", getContent())
                .toString();
    }
}
